package org.example;

import java.util.Collections;
import java.util.PriorityQueue;

public class HeapApp {
    public static void main(String[] args) {
        // create min heap
        PriorityQueue<Integer> minheap = new PriorityQueue<>();

//        PriorityQueue<Integer> maxHeap = new PriorityQueue<>(Collections.reverseOrder());

        minheap.add(10);
        minheap.add(3);
        minheap.add(20);

        minheap.peek();

        minheap.poll();

        minheap.size();

        while (minheap.size() != 0) {
            minheap.poll();
        }

    }
}
